import QtQuick 1.0
import com.nokia.symbian 1.0
import QtMobility.connectivity 1.2
import NfcPeerToPeer 1.0

Page {
    id: page6
    anchors.fill: parent
    tools: toolBarMainPage

    NfcPeerToPeer {
        id: nfcPeerToPeer
        onChatMessage: {
            receiveTextArea.text = nfcClientMessage;
        }
    }

    Column {
        anchors.fill: parent
        spacing: platformStyle.paddingLarge
        TextField {
            id: sendTextField
            width: parent.width

        }
        Button {
            id: sendButton
            anchors.top: backgroundImage.bottom
            anchors.horizontalCenter: parent.horizontalCenter
            text: "Send Chat Message"
            onClicked: nfcPeerToPeer.sendText(sendTextField.text)
        }
        TextArea {
            id: receiveTextArea
            width: parent.width

        }
    }
}
